
import tensorflow as tf

"""
输入: inputs , 
tensor 中对应元素相加,
和add_n 的区别?
"""

sess = tf.Session()
a = tf.constant([[1, 2], [3, 4]])
b = tf.constant([[5, 0], [0, 6]])
print(sess.run(tf.accumulate_n([a, b])))

